package com.example.enjoyarkuix.bridge;

public class BridgeUtil {
    private static BridgeTest mBridgeTest;

    public static String getParamData(String param) {
        if (param == null || param.length() == 0) {
            return "";
        }
        StringBuilder builder = new StringBuilder();
        String[] array = param.split(",");
        if (array.length < 2) {
            return "";
        }
        for (int i = 0; i < array.length - 1; i++) {
            String[] currentArray = array[i].split(":");
            if (currentArray.length > 1) {
                builder.append(currentArray[1].replace("\"", ""));
                if (i < array.length - 2) {
                    builder.append(",");
                }
            }
        }
        return builder.toString();
    }

    public static BridgeTest getBridgeTest() {
        return mBridgeTest;
    }

    public static void setBridgeTest(BridgeTest bridge) {
        mBridgeTest = bridge;
    }
}
